package com.yst.web.common;

/**
 * code of the result
 */
public enum ResultCode {
    SUCCESS(200,"成功"),

    WARN(201,"警告"),
    ERROR_UNKNOWN(500,"未知错误"),
    ERROR_SIGN(501,"数字签名无效"),
    ERROR_NEED_LOGIN(510,"需要登录"),
    ERROR_LOGIN_TIMEOUT(511,"登录超时"),
    ERROR_LOGIN_ERROR(520,"用户不存在,或者密码错误"),
    ERROR_NEED_REGISTER(521,"未注册用户"),
    ERROR_MODIFY_PASSWORD(522,"旧密码错误"),
    ERROR_PERMISSIONS_INSUFFICIENT(530,"权限不足"),
    ERROR_LOGIN_CODE(531,"验证码错误"),
    ERROR_BUSINESS(600,"业务错误"),
    ERROR_EXISTS_SENSITIVE(700,"包含敏感词"),
    ERROR_EXISTS_CODE(800,"已存在的代码"),
    ERROR_SYSTEM_BUSY(900,"系统忙,请稍候再试"),
    ;

    public final int code;
    public final String description;
    ResultCode(int code,String description){
        this.code=code;
        this.description=description;
    }
}
